Integrand size = 23, antiderivative size = 186 \[ \int (a+b \sin (e+f x))^2 (g \tan (e+f x))^p \, dx=\frac {a^2 \operatorname {Hypergeometric2F1}\left (1,\frac {1+p}{2},\frac {3+p}{2},-\tan ^2(e+f x)\right ) (g \tan (e+f x))^{1+p}}{f g (1+p)}+\frac {2 a b \cos ^2(e+f x)^{\frac {1+p}{2}} \operatorname {Hypergeometric2F1}\left (\frac {1+p}{2},\frac {2+p}{2},\frac {4+p}{2},\sin ^2(e+f x)\right ) \sin (e+f x) (g \tan (e+f x))^{1+p}}{f g (2+p)}+\frac {b^2 \operatorname {Hypergeometric2F1}\left (2,\frac {3+p}{2},\frac {5+p}{2},-\tan ^2(e+f x)\right ) (g \tan (e+f x))^{3+p}}{f g^3 (3+p)} \]
a^2*hypergeom([1, 1/2+1/2*p],[3/2+1/2*p],-tan(f*x+e)^2)*(g*tan(f*x+e))^(p+ 1)/f/g/(p+1)+2*a*b*(cos(f*x+e)^2)^(1/2+1/2*p)*hypergeom([1+1/2*p, 1/2+1/2* p],[2+1/2*p],sin(f*x+e)^2)*sin(f*x+e)*(g*tan(f*x+e))^(p+1)/f/g/(2+p)+b^2*h ypergeom([2, 3/2+1/2*p],[5/2+1/2*p],-tan(f*x+e)^2)*(g*tan(f*x+e))^(3+p)/f/ g^3/(3+p)
Result contains higher order function than in optimal. Order 6 vs. order 5 in optimal.
Time = 14.64 (sec) , antiderivative size = 2464, normalized size of antiderivative = 13.25 \[ \int (a+b \sin (e+f x))^2 (g \tan (e+f x))^p \, dx=\text {Result too large to show} \]
(2*(Cos[e + f*x]*Sec[(e + f*x)/2]^2)^p*Tan[(e + f*x)/2]*(a^2*(2 + p)*Appel lF1[(1 + p)/2, p, 1, (3 + p)/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + 4*b*(b*(2 + p)*AppellF1[(1 + p)/2, p, 2, (3 + p)/2, Tan[(e + f*x)/2]^2, - Tan[(e + f*x)/2]^2] - b*(2 + p)*AppellF1[(1 + p)/2, p, 3, (3 + p)/2, Tan[( e + f*x)/2]^2, -Tan[(e + f*x)/2]^2] + a*(1 + p)*AppellF1[1 + p/2, p, 2, 2 + p/2, Tan[(e + f*x)/2]^2, -Tan[(e + f*x)/2]^2]*Tan[(e + f*x)/2]))*(g*Tan[ e + f*x])^p*(-1/4*(b^2*Cos[2*(e + f*x)]^3*Tan[e + f*x]^p) + (I/4)*b^2*Sin[ 2*(e + f*x)]*Tan[e + f*x]^p + I*a^2*Sin[e + f*x]^2*Sin[2*(e + f*x)]*Tan[e + f*x]^p + (b^2*Sin[2*(e + f*x)]^2*Tan[e + f*x]^p)/2 - (I/4)*b^2*Sin[2*(e + f*x)]^3*Tan[e + f*x]^p + Cos[e + f*x]^2*(a^2*Cos[2*(e + f*x)]*Tan[e + f* x]^p - I*a^2*Sin[2*(e + f*x)]*Tan[e + f*x]^p) + Cos[2*(e + f*x)]^2*((b^2*T an[e + f*x]^p)/2 + a*b*Sin[e + f*x]*Tan[e + f*x]^p - (I/4)*b^2*Sin[2*(e + f*x)]*Tan[e + f*x]^p) + Sin[e + f*x]*(I*a*b*Sin[2*(e + f*x)]*Tan[e + f*x]^ p + a*b*Sin[2*(e + f*x)]^2*Tan[e + f*x]^p) + Cos[2*(e + f*x)]*(-1/4*(b^2*T an[e + f*x]^p) - a*b*Sin[e + f*x]*Tan[e + f*x]^p - a^2*Sin[e + f*x]^2*Tan[ e + f*x]^p - (b^2*Sin[2*(e + f*x)]^2*Tan[e + f*x]^p)/4) + Cos[e + f*x]*((- I)*a*b*Cos[2*(e + f*x)]^2*Tan[e + f*x]^p + a*b*Sin[2*(e + f*x)]*Tan[e + f* x]^p + 2*a^2*Sin[e + f*x]*Sin[2*(e + f*x)]*Tan[e + f*x]^p - I*a*b*Sin[2*(e + f*x)]^2*Tan[e + f*x]^p + Cos[2*(e + f*x)]*(I*a*b*Tan[e + f*x]^p + (2*I) *a^2*Sin[e + f*x]*Tan[e + f*x]^p))))/(f*(1 + p)*(2 + p)*((2*p*(Cos[e + ...
Time = 0.44 (sec) , antiderivative size = 186, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.130, Rules used = {3042, 3201, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a+b \sin (e+f x))^2 (g \tan (e+f x))^p \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a+b \sin (e+f x))^2 (g \tan (e+f x))^pdx\) |
\(\Big \downarrow \) 3201 |
\(\displaystyle \int \left (a^2 (g \tan (e+f x))^p+2 a b \sin (e+f x) (g \tan (e+f x))^p+b^2 \sin ^2(e+f x) (g \tan (e+f x))^p\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a^2 (g \tan (e+f x))^{p+1} \operatorname {Hypergeometric2F1}\left (1,\frac {p+1}{2},\frac {p+3}{2},-\tan ^2(e+f x)\right )}{f g (p+1)}+\frac {2 a b \sin (e+f x) \cos ^2(e+f x)^{\frac {p+1}{2}} (g \tan (e+f x))^{p+1} \operatorname {Hypergeometric2F1}\left (\frac {p+1}{2},\frac {p+2}{2},\frac {p+4}{2},\sin ^2(e+f x)\right )}{f g (p+2)}+\frac {b^2 (g \tan (e+f x))^{p+3} \operatorname {Hypergeometric2F1}\left (2,\frac {p+3}{2},\frac {p+5}{2},-\tan ^2(e+f x)\right )}{f g^3 (p+3)}\) |
(a^2*Hypergeometric2F1[1, (1 + p)/2, (3 + p)/2, -Tan[e + f*x]^2]*(g*Tan[e + f*x])^(1 + p))/(f*g*(1 + p)) + (2*a*b*(Cos[e + f*x]^2)^((1 + p)/2)*Hyper geometric2F1[(1 + p)/2, (2 + p)/2, (4 + p)/2, Sin[e + f*x]^2]*Sin[e + f*x] *(g*Tan[e + f*x])^(1 + p))/(f*g*(2 + p)) + (b^2*Hypergeometric2F1[2, (3 + p)/2, (5 + p)/2, -Tan[e + f*x]^2]*(g*Tan[e + f*x])^(3 + p))/(f*g^3*(3 + p) )
3.3.4.3.1 Defintions of rubi rules used
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((g_.)*tan[(e_.) + (f_.)*( x_)])^(p_.), x_Symbol] :> Int[ExpandIntegrand[(g*Tan[e + f*x])^p, (a + b*Si n[e + f*x])^m, x], x] /; FreeQ[{a, b, e, f, g, p}, x] && NeQ[a^2 - b^2, 0] && IGtQ[m, 0]
\[\int \left (a +b \sin \left (f x +e \right )\right )^{2} \left (g \tan \left (f x +e \right )\right )^{p}d x\]
\[ \int (a+b \sin (e+f x))^2 (g \tan (e+f x))^p \, dx=\int { {\left (b \sin \left (f x + e\right ) + a\right )}^{2} \left (g \tan \left (f x + e\right )\right )^{p} \,d x } \]
\[ \int (a+b \sin (e+f x))^2 (g \tan (e+f x))^p \, dx=\int \left (g \tan {\left (e + f x \right )}\right )^{p} \left (a + b \sin {\left (e + f x \right )}\right )^{2}\, dx \]
\[ \int (a+b \sin (e+f x))^2 (g \tan (e+f x))^p \, dx=\int { {\left (b \sin \left (f x + e\right ) + a\right )}^{2} \left (g \tan \left (f x + e\right )\right )^{p} \,d x } \]
\[ \int (a+b \sin (e+f x))^2 (g \tan (e+f x))^p \, dx=\int { {\left (b \sin \left (f x + e\right ) + a\right )}^{2} \left (g \tan \left (f x + e\right )\right )^{p} \,d x } \]
Timed out. \[ \int (a+b \sin (e+f x))^2 (g \tan (e+f x))^p \, dx=\int {\left (g\,\mathrm {tan}\left (e+f\,x\right )\right )}^p\,{\left (a+b\,\sin \left (e+f\,x\right )\right )}^2 \,d x \]